$(function() {

    /*移动端绑定事件*/
    FastClick.attach(document.body);

    var actionList = {
        //测试
        'test1': function(self) {
            test1(self)
        },
        'tochangeback': function(self) {
            tochangeback(self)
        },

    }
    var $body = $(document)


    /*绑定click事件*/
    $body.on('click', '[data-action]', function() {
        var actionName = $(this).data('action')
        var action = actionList[actionName]
        var self = this
        if ($.isFunction(action))
            action(self)
    })

    /**
     * [matchAction 测试安卓和iphone手机]
     * @param  {[type]} self [description]
     * @return {[type]}      [description]
     */
    function test1(self) {

        console.log("测试");
    }

    /*利用事件绑定*/
    function tochangeback(self) {
        console.log("22");
        $("#testimg").html('<img src="./image/index.jpg" alt="">');
    }

    /*
     *@@关闭下载提示
     */
    function close(self) {
        $("#").hide();
    }

})